// Main
jQuery(document).ready(function($) {
	var windowWidth = window.innerWidth?window.innerWidth:$(window).width();
	
	if(windowWidth <947 ) {
		$('#content').width(windowWidth);
	}else{
		$('#content').width(947);
	}
	$(window).resize(function(event) {
		windowWidth = window.innerWidth?window.innerWidth:$(window).width();
		if(windowWidth <947 ) {
			$('#content').width(windowWidth);
		}else{
			$('#content').width(947);
		}
	});

	// Toggle menu
	var isShow = false;
	$('#mobile-menu-toggle').click(function(event) {
		if (!isShow) {
			$('.menu').show('fast');
			isShow = true;
		}else{
			$('.menu').hide('fast');
			isShow = false;
		}
		event.stopPropagation();
	});
	$('html').click(function(event) {
		if (isShow) {
			$('.menu').hide('fast');
			isShow = false;
		}
	});
});